home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 323 < prev    next >
Encoding:
Text File  |  1996-08-05  |  999 b   |  34 lines

  1. Path: nntp.ipst.edu!gt-news!prism!prism!not-for-mail
  2. From: gt1329a@prism.gatech.edu (David Ward)
  3. Newsgroups: comp.lang.c
  4. Subject: fopen() with a UNIX path?
  5. Date: 3 Jan 1996 23:36:12 -0500
  6. Organization: Ga Tech Sucks
  7. Message-ID: <4cflfs$1m@acmez.gatech.edu>
  8. NNTP-Posting-Host: acmez-prism.gatech.edu
  9.  
  10.  Hey everyone. Does anyone know why something like this doesn't work?
  11.  
  12. main()
  13.   {
  14.   FILE  *in;
  15.  
  16.   if ( in = fopen ("~/.friends", "r")) == NULL )
  17.     printf ("Put the stupid file there\n");
  18.   else
  19.     ;
  20.     /*  Whatever */
  21.   }
  22.  
  23.  The problem I'm having is that it won't find the file. If I put just
  24. ".friends" and run it in the same directory, it's fine... What am I doing
  25. wrong?
  26.  
  27.  Thanks
  28.    Dave
  29. -- 
  30. |David Ward                                  | '85 300ZX Turbo IZCC #451 |
  31. |gt1329a@prism.gatech.edu  (404)206-9753     |  The Internet Z-Car Club  |
  32. |http://www.cc.gatech.edu/people/home/davew/ |                           |
  33. +--------------------------------------------+---------------------------+
  34.